package com.rituo.lock.controller;

import com.rituo.lock.utils.LockUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Gjing
 **/
@RestController
public class LockController {
    @Autowired
    LockUtils lockUtils;

    @GetMapping("/lua")
    public ResponseEntity lua() throws Exception{
        lockUtils.lock();
        return ResponseEntity.ok(null);
    }
}